<template>
  <div style="position: relative;">
    <div class="watermark-container">
      <Icon :icon="imgUrl" :size="110"></Icon>
    </div>
  </div>

</template>
<script setup lang="ts">
import { ref, onMounted, watch } from "vue";

import Icon from '@/components/Icon/Icon.vue';
const props = defineProps({
  status: {
    type: Number,
    default: null,
  }
});

const imgUrl = ref('');

watch(
  () => props.status,
  (v) => {
    if (v != null) {
      initFn(v);
    }
  },
);

function initFn(status) {
  let img = "";
  switch (status) {
    case 2:  //审批通过
      img = "shenpitongguo_1|svg";
      break;
    case 99:
      img = "shenpijujue|svg";
      break;
    case 0:
      img = "yichexiao|svg";
      break;
  }
  imgUrl.value = img;
}

</script>
<style scoped>
.watermark-container {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  opacity: 0.5;
}
</style>